package com.cn.整合.SpringBoot.queue;

import org.apache.activemq.command.ActiveMQQueue;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.jms.annotation.EnableJms;
import org.springframework.stereotype.Component;

import javax.jms.Queue;

/**
 * @author: dlr
 * @data: 2019/8/22 23:27
 * @desc: 配置类SpringBoot整合点对点队列
 */
@Component
@EnableJms
public class configProducerQueue {

    @Value("${queue-name}")
    private String queue;

    @Bean
    public Queue getQueue(){

        return new ActiveMQQueue(queue);
    }
}
